Optimal. Leaf size=154 \[ -\frac {b \log (\cos (c+d x))}{d \left (a^2+b^2\right )}-\frac {a x}{a^2+b^2}-\frac {a \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}+\frac {a^6 \log (a+b \tan (c+d x))}{b^5 d \left (a^2+b^2\right )}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.58, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3566, 3647, 3648, 3627, 3617, 31, 3475} \[ \frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {a^6 \log (a+b \tan (c+d x))}{b^5 d \left (a^2+b^2\right )}-\frac {b \log (\cos (c+d x))}{d \left (a^2+b^2\right )}-\frac {a x}{a^2+b^2}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3475
Rule 3566
Rule 3617
Rule 3627
Rule 3647
Rule 3648
Rubi steps
\begin {align*} \int \frac {\tan ^6(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac {\tan ^4(c+d x)}{4 b d}+\frac {\int \frac {\tan ^3(c+d x) \left (-4 a-4 b \tan (c+d x)-4 a \tan ^2(c+d x)\right )}{a+b \tan (c+d x)} \, dx}{4 b}\\ &=-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}+\frac {\int \frac {\tan ^2(c+d x) \left (12 a^2+12 \left (a^2-b^2\right ) \tan ^2(c+d x)\right )}{a+b \tan (c+d x)} \, dx}{12 b^2}\\ &=\frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}+\frac {\int \frac {\tan (c+d x) \left (-24 a \left (a^2-b^2\right )+24 b^3 \tan (c+d x)-24 a \left (a^2-b^2\right ) \tan ^2(c+d x)\right )}{a+b \tan (c+d x)} \, dx}{24 b^3}\\ &=-\frac {a \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}+\frac {\int \frac {24 a^2 \left (a^2-b^2\right )+24 \left (a^4-a^2 b^2+b^4\right ) \tan ^2(c+d x)}{a+b \tan (c+d x)} \, dx}{24 b^4}\\ &=-\frac {a x}{a^2+b^2}-\frac {a \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}+\frac {a^6 \int \frac {1+\tan ^2(c+d x)}{a+b \tan (c+d x)} \, dx}{b^4 \left (a^2+b^2\right )}+\frac {b \int \tan (c+d x) \, dx}{a^2+b^2}\\ &=-\frac {a x}{a^2+b^2}-\frac {b \log (\cos (c+d x))}{\left (a^2+b^2\right ) d}-\frac {a \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}+\frac {a^6 \operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,b \tan (c+d x)\right )}{b^5 \left (a^2+b^2\right ) d}\\ &=-\frac {a x}{a^2+b^2}-\frac {b \log (\cos (c+d x))}{\left (a^2+b^2\right ) d}+\frac {a^6 \log (a+b \tan (c+d x))}{b^5 \left (a^2+b^2\right ) d}-\frac {a \left (a^2-b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\tan ^4(c+d x)}{4 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 1.73, size = 167, normalized size = 1.08 \[ \frac {6 \left (2 a^6 \log (a+b \tan (c+d x))+b^5 (b+i a) \log (-\tan (c+d x)+i)+b^5 (b-i a) \log (\tan (c+d x)+i)\right )-12 a b \left (a^4-b^4\right ) \tan (c+d x)+6 b^2 \left (a^4-b^4\right ) \tan ^2(c+d x)+3 b^4 \left (a^2+b^2\right ) \tan ^4(c+d x)-4 a b^3 \left (a^2+b^2\right ) \tan ^3(c+d x)}{12 b^5 d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 181, normalized size = 1.18 \[ -\frac {12 \, a b^{5} d x - 6 \, a^{6} \log \left (\frac {b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - 3 \, {\left (a^{2} b^{4} + b^{6}\right )} \tan \left (d x + c\right )^{4} + 4 \, {\left (a^{3} b^{3} + a b^{5}\right )} \tan \left (d x + c\right )^{3} - 6 \, {\left (a^{4} b^{2} - b^{6}\right )} \tan \left (d x + c\right )^{2} + 6 \, {\left (a^{6} + b^{6}\right )} \log \left (\frac {1}{\tan \left (d x + c\right )^{2} + 1}\right ) + 12 \, {\left (a^{5} b - a b^{5}\right )} \tan \left (d x + c\right )}{12 \, {\left (a^{2} b^{5} + b^{7}\right )} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 17.07, size = 158, normalized size = 1.03 \[ \frac {\frac {12 \, a^{6} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2} b^{5} + b^{7}} - \frac {12 \, {\left (d x + c\right )} a}{a^{2} + b^{2}} + \frac {6 \, b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b \tan \left (d x + c\right )^{2} - 6 \, b^{3} \tan \left (d x + c\right )^{2} - 12 \, a^{3} \tan \left (d x + c\right ) + 12 \, a b^{2} \tan \left (d x + c\right )}{b^{4}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 179, normalized size = 1.16 \[ \frac {\tan ^{4}\left (d x +c \right )}{4 b d}-\frac {a \left (\tan ^{3}\left (d x +c \right )\right )}{3 b^{2} d}+\frac {a^{2} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d \,b^{3}}-\frac {\tan ^{2}\left (d x +c \right )}{2 b d}-\frac {a^{3} \tan \left (d x +c \right )}{d \,b^{4}}+\frac {a \tan \left (d x +c \right )}{b^{2} d}+\frac {a^{6} \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5} \left (a^{2}+b^{2}\right ) d}+\frac {b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{2 d \left (a^{2}+b^{2}\right )}-\frac {a \arctan \left (\tan \left (d x +c \right )\right )}{d \left (a^{2}+b^{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.81, size = 146, normalized size = 0.95 \[ \frac {\frac {12 \, a^{6} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2} b^{5} + b^{7}} - \frac {12 \, {\left (d x + c\right )} a}{a^{2} + b^{2}} + \frac {6 \, b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}} + \frac {3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, {\left (a^{2} b - b^{3}\right )} \tan \left (d x + c\right )^{2} - 12 \, {\left (a^{3} - a b^{2}\right )} \tan \left (d x + c\right )}{b^{4}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.26, size = 165, normalized size = 1.07 \[ \frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{2\,d\,\left (b+a\,1{}\mathrm {i}\right )}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {1}{2\,b}-\frac {a^2}{2\,b^3}\right )}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4}{4\,b\,d}-\frac {a\,{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,b^2\,d}+\frac {a^6\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{d\,\left (a^2\,b^5+b^7\right )}+\frac {a\,\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {1}{b}-\frac {a^2}{b^3}\right )}{b\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{2\,d\,\left (a+b\,1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.54, size = 944, normalized size = 6.13 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________